/*
 * @(#)CommonCodeDAO.java $version 2013-3-1
 * 
 * Copyright 2013 NADO Group. All rights Reserved.
 * NADO PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.nado.iims2.community.dao;

import java.sql.SQLException;
import java.util.List;

import com.nado.extensions.util.DataMap;
import com.nado.iims2.community.model.CategoryModel;
import com.nado.iims2.community.model.CodeModel;

/**
 * The Class CommonCodeDAO.
 * 
 * @author nado
 */
public interface CommonCodeDAO {
	/**
	 * Select common category list.
	 * 
	 * @return
	 * @throws SQLException
	 */
	List<DataMap> selectCommonCategoryList() throws SQLException;
	
	/**
	 * Select common category list total.
	 * @return
	 * @throws SQLException
	 */
	int selectCommonCategoryListCount() throws SQLException;
	
	/**
	 * Select common category detail.
	 * 
	 * @param categoryCd
	 * @return
	 * @throws SQLException
	 */
	CategoryModel selectCommonCategoryDetail(String categoryCd) throws SQLException;
	
	/**
	 * Select common code list.
	 * 
	 * @param categoryCd
	 * @return
	 * @throws SQLException
	 */
	List<DataMap> selectCommonCodeList(String categoryCd) throws SQLException;
	
	/**
	 * Select common code & name list.
	 * 
	 * @param categoryCd
	 * @return
	 * @throws SQLException
	 */
	List<DataMap> selectCommonCodeAndNameList(String categoryCd) throws SQLException;
	
	/**
	 * Select common code list total.
	 * 
	 * @param categoryCd
	 * @return
	 * @throws SQLException
	 */
	int selectCommonCodeListCount(String categoryCd) throws SQLException;
	
	/**
	 * Select common code detail.
	 * 
	 * @param categoryCd
	 * @param commonCd
	 * @return
	 * @throws SQLException
	 */
	CodeModel selectCommonCodeDetail(String categoryCd, String commonCd) throws SQLException;
	
	/**
	 * Update common category info.
	 * 
	 * @param model
	 * @return
	 * @throws SQLException
	 */
	int updateCommonCategory(CategoryModel model) throws SQLException;
	
	/**
	 * Delete common category info.
	 * 
	 * @param categoryCd
	 * @return
	 * @throws SQLException
	 */
	int deleteCommonCategory(String categoryCd) throws SQLException;
	
	/**
	 * Update common code info.
	 * 
	 * @param model
	 * @return
	 * @throws SQLException
	 */
	int updateCommonCode(CodeModel model) throws SQLException;
	
	/**
	 * Delete common code info.
	 * 
	 * @param categoryCd
	 * @param commonCd
	 * @return
	 * @throws SQLException
	 */
	int deleteCommonCode(String categoryCd, String commonCd) throws SQLException;
}
